package com.second.app.designpattern.singleinstance;

/**
 * @Author GYZ
 * @Date 2023/7/27
 * <pre>
 *   懒汉式
 * </pre>
 */
public class SingletonInstance04 {

    private SingletonInstance04() {

    }

    private static final class InstanceHolder {
        static final SingletonInstance04 instance = new SingletonInstance04();
    }

    public static SingletonInstance04 getInstance() {
        return InstanceHolder.instance;
    }
}
